<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>const用来声明特别重要以至于不应该被修改的变量</p>
    <script>
        // const一旦声明变量，就必须立即初始化，不能留到以后赋值
        const num = 100; // 值类型
        console.log(num);
        // num = 404; // Assignment to constant variable. 修改数据时只能在定义的位置修改

        // 订单状态 100未付款 200已付款未发货 300已付款已收获
        const orderCodes = [100, 200, 300]; // 引用类型  orderCodes指向的不是数组，orderCodes是一个引用
        let order1 = {
            id: '23ry23y9r4y32',
            status: orderCodes[1],
            money: 999
        }
        console.log(orderCodes);
        console.log(order1);
        // orderCodes[0] = '105';
        // orderCodes.push(400)
        // orderCodes = [1,23,6,467]
        console.log(orderCodes);
    </script>
</body>
</html>